package com.william.jdbcplus.test.util;

import com.william.jdbcplus.core.util.JdbcUtil;

import javax.sql.DataSource;

public class DsUtil {

    public static DataSource getMysql() {
        String url = "jdbc:mysql://192.168.0.98:3333/jeecg-boot?serverTimezone=UTC";
        String username = "root";
        String password = "123456";
        DataSource dataSource = JdbcUtil.createDataSource(url, username, password);
        return dataSource;
    }

    public static DataSource getOracle() {
        String url = "jdbc:oracle:thin:@192.168.0.98:1521:ORCL";
        String username = "HIS_TEST";
        String password = "root";
        DataSource dataSource = JdbcUtil.createDataSource(url, username, password);
        return dataSource;
    }

    public static DataSource getSqlServer() {
        String url = "jdbc:sqlserver://192.168.0.98:1433;DatabaseName=his_test";
        String username = "sa";
        String password = "lis";
        DataSource dataSource = JdbcUtil.createDataSource(url, username, password);
        return dataSource;
    }
}
